# -*- coding: utf-8 -*-
#aula6_b

import smtplib, urllib2, SimpleHTTPServer, SocketServer
for line in urllib2.urlopen('http://www.publico.pt'):
    if 'Coelho' in line or 'Jardim' in line or 'Raspadinha' in line:
        print line

server = smtplib.SMTP('smtp.cheapnet.it')
try:
    server.sendmail('sergio.sardo@gmail.com', 'sergio.sardo@gmail.com', 'teste')
    server.quit()
except: pass
PORT = 8000
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
httpd = SocketServer.TCPServer(("",PORT),Handler)
#httpd.serve_forever()
